import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hao/main.dart';
import 'package:hao/page/launch/LaunchViewModel.dart';
import 'package:hao/page/user/LoginPage.dart';

class LaunchPage extends StatefulWidget {
  const LaunchPage({Key? key}) : super(key: key);

  @override
  State<LaunchPage> createState() => _LaunchPageState();
}

class _LaunchPageState extends State<LaunchPage> {
  final LaunchViewModel _viewModel = Get.put(LaunchViewModel());

  @override
  Widget build(BuildContext context) {
    return Obx(() => _viewModel.hasInit.value
        ? (_viewModel.hasLogin.value ? const TabPage() :const LoginPage())
        : const SizedBox());
  }
}
